home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
comm
/
irc
/
KuangEleven3Gm.lha
/
Kuang Eleven 3
/
Rexx
/
awayaway.amirx
< prev
next >
Wrap
Text File
|
1998-05-09
|
2KB
|
89 lines
/* $VER: AwayAway.amirx 3.0 (9.5.98) Kuang Eleven edition
Requires : AmIRC 2 , Kuang Eleven 3
Configure the sound to play when you are away
Sets AWAY
*/
snd='Away.WAV'
options results
awnick=getclip('sc_awaynick')
a=getclip('sc_awaytxt')
portvalue=right(address(),1)
awayecho=gettemp('awayecho')
if awayecho=='' then call autostring
else do
args=gettemp('awayargs')
cmd=gettemp('awaycmd')
str=gettemp('awaystr')
call readargs(args,'QUIET=Q/S,VERBOSE=V/S,HIDE/S,ALL/S,BULLSHIT/F')
end
if getclip('st_awayt')=='' then call setclip('st_awayt',date('i') time('s'))
if hide|getclip('sc_aicon')=='ON' then "HIDE"
if awnick~='' then do
call setclip('st_orignick'portvalue,getnick())
'RAW NICK' awnick
end
if str~='' then do
"CHANNELS"
c=result
"GETCHANNEL"
cc=result
if words(c)~==0 then do i=1 to words(c)
ic=word(c,i)
if ic=cc then 'SAY' cmd
else 'QueueRAW PRIVMSG' ic ':'str
end
if a~='TEXT' then "PLAYSOUND" snd
end
else if awayecho~='' then cecho('SetAway',awayecho)
EXIT
cecho:;"ECHO P="d2c(27)"b«"arg(1)"» TEXT="arg(2)'.';return 0
getnick:;"GETMYNICK";return result
gettemp: PROCEDURE EXPOSE portvalue
clip='st_'arg(1)||portvalue
x=getclip(clip)
call setclip(clip)
return x
autostring:
reason=getclip('sc_msg_autoaway')
disp=getclip('sc_awayverb')
log=getclip('sc_log')
if log=='' then log='OFF'
page=getclip('sc_page')
if page=='' then page='OFF'
s=' Log['log'] Page['page']'
if disp='ON' then str='->'reason'<-';else str=':' reason
awayecho=str||s
if disp='ON' then str=str||s
str='is away' str
if page='ON' then do
if awnick='' then mnick=awnick;else mnick=getnick()
s=s '/CTCP' mnick 'PAGE'
end
hide=0
if getclip('sc_aicon')=='ON' then hide=1
if hide&show('P',KUANG) then address KUANG HIDE
Select
when a='TEXT'|a='ON' then do
cmd='/ME' str
str=div||'ACTION' str||div
end
when a='SOUND' then do
str=div||'SOUND' snd||div
cmd='/SOUND' snd
end
when a='BOTH' then do
cmd='/SOUND' snd str
str=div||'SOUND' snd str||div
end
otherwise
str=''
end
return